--[[ 编码: WMS-71-21 名称: 库存量表差异-刷新库存量表 作者:HAN 日期:2025-1-29 级别:固定 (说明本段代码在项目中不太会变化) 函数: ResetInventory 功能: 刷新仓库或库区量表 更改记录: --]] wms_base = require ("wms_base") function ResetInventory ( strLuaDEID ) local nRet, strRetInfo local paramter nRet, paramter = m3.GetSysDataJson( strLuaDEID ) if ( nRet ~=0 ) then lua.Error( strLuaDEID, debug.getinfo(1), paramter ) end -- {"wh_code":"x","area_code":"x"} local wh_code = paramter.wh_code local area_code = paramter.area_code if ( wh_code == nil or wh_code == '') then lua.Error( strLuaDEID, debug.getinfo(1), "仓库编码必须有值! " ) end if ( area_code == nil ) then area_code = '' end if ( area_code ~= '' ) then nRet, strRetInfo = wms.wms_ResetInventory( "Area", area_code ) if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), strRetInfo ) end else nRet, strRetInfo = wms.wms_ResetInventory( "Warehouse", wh_code ) if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), strRetInfo ) end end end